﻿@{
    Layout = "_LayoutPhone";
}

<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/themes/global/css/bootstrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<!-- 字体图标 CSS -->
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/fonts/font-awesome/font-awesome.css">
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/fonts/web-icons/web-icons.css">

<!-- Site CSS -->
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/themes/base/css/site.css" id="admui-siteStyle">

<!-- 插件 CSS -->
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/vendor/animsition/animsition.css">
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/vendor/toastr/toastr.css">
<link rel="stylesheet" href="~/admui-13945148017-1592211513218/public/vendor/mCustomScrollbar/jquery.mCustomScrollbar.css">

<!-- Page CSS -->
<!-- 插件 -->
<script src="~/admui-13945148017-1592211513218/public/vendor/jquery/jquery.min.js"></script>
<script src="~/admui-13945148017-1592211513218/public/vendor/bootstrap/bootstrap.bundle.min.js"></script>
<script src="~/admui-13945148017-1592211513218/public/vendor/lodash/lodash.min.js"></script>
<script src="~/admui-13945148017-1592211513218/public/vendor/breakpoints/breakpoints.min.js"></script>

<!--[if lt IE 10]>
<script src="~/admui-13945148017-1592211513218/public/vendor/media-match/media.match.min.js"></script>
<script src="~/admui-13945148017-1592211513218/public/vendor/respond/respond.min.js"></script>
<![endif]-->
<!-- 核心 -->
<script src="~/admui-13945148017-1592211513218/public/themes/global/js/core.js"></script>
<script src="~/admui-13945148017-1592211513218/public/themes/global/js/configs/site-configs.js"></script>
<script src="~/admui-13945148017-1592211513218/public/themes/global/js/components.js"></script>
<script src="~/admui-13945148017-1592211513218/public/themes/base/js/site.js"></script>
<style>
    body {
        padding-top: 0px !important;
    }
</style>
<script>
    $(document).ready(function () {
        Bind(0);
    });

    function Bind(suoyin) {

        if (suoyin == 0) {
            $("#CaiDai_YeWuYuan_BenRi").show();
            $("#CaiDai_ZhiYeGuWen_BenRi").show();
            $("#CaiDai_ZongHe_BenRi").show();
            $("#CaiDai_YeWuYuan_BenZhou").hide();
            $("#CaiDai_ZhiYeGuWen_BenZhou").hide();
            $("#CaiDai_ZongHe_BenZhou").hide();
            $("#CaiDai_YeWuYuan_BenYue").hide();
            $("#CaiDai_ZhiYeGuWen_BenYue").hide();
            $("#CaiDai_ZongHe_BenYue").hide();
        }
        if (suoyin == 1) {
            $("#CaiDai_YeWuYuan_BenRi").hide();
            $("#CaiDai_ZhiYeGuWen_BenRi").hide();
            $("#CaiDai_ZongHe_BenRi").hide();
            $("#CaiDai_YeWuYuan_BenZhou").show();
            $("#CaiDai_ZhiYeGuWen_BenZhou").show();
            $("#CaiDai_ZongHe_BenZhou").show();
            $("#CaiDai_YeWuYuan_BenYue").hide();
            $("#CaiDai_ZhiYeGuWen_BenYue").hide();
            $("#CaiDai_ZongHe_BenYue").hide();
        }
        if (suoyin == 2) {
            $("#CaiDai_YeWuYuan_BenRi").hide();
            $("#CaiDai_ZhiYeGuWen_BenRi").hide();
            $("#CaiDai_ZongHe_BenRi").hide();
            $("#CaiDai_YeWuYuan_BenZhou").hide();
            $("#CaiDai_ZhiYeGuWen_BenZhou").hide();
            $("#CaiDai_ZongHe_BenZhou").hide();
            $("#CaiDai_YeWuYuan_BenYue").show();
            $("#CaiDai_ZhiYeGuWen_BenYue").show();
            $("#CaiDai_ZongHe_BenYue").show();
        } 34


        $.ajax({
            type: "POST",
            url: "../PhoneTongJi/GetGenJinAndDaoFangList",
            cache: false,  //禁用缓存\
            async: false,
            data: {},  //传入组装的参数
            dataType: "json",
            success: function (result) {

                console.log(result);

                if (result.length > 0) {

                    var renyuanleixing = result[suoyin].PeopleType;

                    if (renyuanleixing == '部门领导') {
                        $("#lbl_BenRiGenJin").text(result[0].DaoFangShuByDayYeWuYuan);
                        $("#lbl_BenZhouGenJin").text(result[1].DaoFangShuuByWeekYeWuYuan);
                        $("#lbl_BenYueGenJin").text(result[2].DaoFangShuByMonthYeWuYuan);
                        $("#div_XiaoShouCeng").show();
                        $("#div_LingDaoCeng").hide();
                        var tab = "";
                        for (var i = 0; i < result[suoyin].YeWuYuansForDaoFang.length; i++) {
                            tab += "<tr><td>" + result[suoyin].YeWuYuansForDaoFang[i].XingMing + "</td><td style=\"text-align:center;\">" + result[suoyin].YeWuYuansForDaoFang[i].BeiZhu10 + "</td></tr>";
                        }
                        $("#tbody_PuTong_YeWuYuan").html(tab);
                    }
                    if (renyuanleixing == "案场领导") {

                        $("#lbl_BenRiGenJin").text(result[0].DaoFangShuByDayZhiYeGuWen);
                        $("#lbl_BenZhouGenJin").text(result[1].DaoFangShuuByWeekZhiYeGuWen);
                        $("#lbl_BenYueGenJin").text(result[2].DaoFangShuByMonthZhiYeGuWen);

                        $("#div_XiaoShouCeng").show();
                        $("#div_LingDaoCeng").hide();
                        var tab = "";
                        for (var i = 0; i < result[suoyin].ZhiYeGuWensForDaoFang.length; i++) {
                            tab += "<tr><td>" + result[suoyin].ZhiYeGuWensForDaoFang[i].XingMing + "</td><td style=\"text-align:center;\">" + result[suoyin].ZhiYeGuWensForDaoFang[i].BeiZhu10 + "</td></tr>";
                        }
                        console.log(suoyin);
                        console.log(result[suoyin].ZhiYeGuWensForDaoFang);
                        console.log(result[suoyin].ZhiYeGuWensForDaoFang.length);
                        $("#tbody_PuTong_YeWuYuan").html(tab);
                    }

                    if (renyuanleixing == "公司领导") {

                        $("#lbl_Yue_XinZengKeHuShu").text(result[0].DaoFangShuByDayZhiYeGuWen);
                        $("#lbl_LingDao_BenRiGenJin").text(result[0].DaoFangShuByDayYeWuYuan);

                        $("#lbl_Yue_DaiKanKeHuShu").text(result[1].DaoFangShuuByWeekZhiYeGuWen);
                        $("#lbl_LingDao_BenZhouGenJin").text(result[1].DaoFangShuuByWeekYeWuYuan);

                        $("#lbl_Yue_ChengJiaoDingDanShu").text(result[2].DaoFangShuByMonthZhiYeGuWen);
                        $("#lbl_LingDao_BenYueGenJin").text(result[2].DaoFangShuByMonthYeWuYuan);

                        $("#div_XiaoShouCeng").hide();
                        $("#div_LingDaoCeng").show();
                        var tab = "";
                        for (var i = 0; i < result[suoyin].YeWuYuansForDaoFang.length; i++) {
                            tab += "<tr><td>" + result[suoyin].YeWuYuansForDaoFang[i].XingMing + "</td><td style=\"text-align:center;\">" + result[suoyin].YeWuYuansForDaoFang[i].BeiZhu10 + "</td></tr>";
                        }
                        var tab1 = "";
                        for (var i = 0; i < result[suoyin].ZhiYeGuWensForDaoFang.length; i++) {
                            tab1 += "<tr><td>" + result[suoyin].ZhiYeGuWensForDaoFang[i].XingMing + "</td><td style=\"text-align:center;\">" + result[suoyin].ZhiYeGuWensForDaoFang[i].BeiZhu10 + "</td></tr>";
                        }

                        console.log(suoyin);
                        console.log(result[suoyin].YeWuYuansForGenJin);
                        console.log(result[suoyin].YeWuYuansForGenJin.length);
                        console.log(result[suoyin].ZhiYeGuWensForGenJin);
                        console.log(result[suoyin].ZhiYeGuWensForGenJin.length);

                        $("#tbody_lingdao_YeWuYuan").html(tab);
                        $("#tbody_lingdao_ZhiYeGuWen").html(tab1);
                    }

                }
            }
        });
    }

</script>




<div class="page-container" id="admui-pageContent">
    <div class="page animation-fade page-forms">
        <div class="page-content">
            <div class="panel">
                <div class="example-wrap">
                    <div id="div_LingDaoCeng">
                        <div class="nav-tabs-horizontal" data-approve="nav-tabs">
                            <ul class="nav nav-tabs nav-tabs-line" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" data-toggle="tab" href="#YeWuYuan"
                                       aria-controls="exampleTabsOne" role="tab">
                                        业务员
                                    </a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" data-toggle="tab" href="#ZhiYeGuWen" aria-controls="exampleTabsTwo"
                                       role="tab">
                                        置业顾问
                                    </a>
                                </li>
                            </ul>
                            <div class="tab-content pt-20">
                                <div class="tab-pane active" id="YeWuYuan" role="tabpanel">
                                    <div class="panel-body" style="padding-left:0px;">
                                        <div class="row">
                                            <div class="col-lg-12">

                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(0);">
                                                    <div class="card card-block bg-green-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_YeWuYuan_BenRi">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>
                                                        <div class="counter counter-lg counter-inverse">
                                                            <div class="counter-label text-uppercase">本日</div>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenRiGenJin">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(1);">
                                                    <div class="card card-block bg-orange-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_YeWuYuan_BenZhou" style="display:none;">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>
                                                        <div class="counter counter-lg counter-inverse">
                                                            <div class="counter-label text-uppercase">近7天</div>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenZhouGenJin">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(2);">
                                                    <div class="card card-block bg-purple-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_YeWuYuan_BenYue" style="display:none;">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>
                                                        <div class="counter counter-lg counter-inverse">
                                                            <div class="counter-label text-uppercase">近30天</div>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenYueGenJin">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <table class="table table-bordered table-hover dataTable table-striped w-full text-nowrap" id="dataTableRenYuan" data-plugin="dataTable">
                                                    <thead>
                                                        <tr>
                                                            <th style="width:85%;">姓名</th>

                                                            <th style="width:15%; text-align:center;">跟进次数</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody id="tbody_lingdao_YeWuYuan">
                                                    </tbody>
                                                </table>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="ZhiYeGuWen" role="tabpanel">
                                    <div class="panel-body" style="padding-left:0px;">
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(0);">
                                                    <div class="card card-block bg-green-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZhiYeGuWen_BenRi">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>

                                                        <div class="counter counter-lg counter-inverse">
                                                            <div class="counter-label text-uppercase">本日</div>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenRiGenJin1">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(1);">
                                                    <div class="card card-block bg-orange-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZhiYeGuWen_BenZhou" style="display:none;">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>
                                                        <div class="counter counter-lg counter-inverse">
                                                            <div class="counter-label text-uppercase">近7天</div>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenZhouGenJin1">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(2);">
                                                    <div class="card card-block bg-purple-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZhiYeGuWen_BenYue" style="display:none;">
                                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                                            </span>
                                                        </div>
                                                        <div class="counter counter-lg counter-inverse">
                                                            <span class="counter-label text-uppercase">近30天</span>
                                                            <span class="counter-number"><label id="lbl_LingDao_BenYueGenJin1">0</label></span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <table class="table table-bordered table-hover dataTable table-striped w-full text-nowrap" id="dataTableRenYuan" data-plugin="dataTable">
                                                    <thead>
                                                        <tr>
                                                            <th style="width:85%;">姓名</th>

                                                            <th style="width:15%; text-align:center;">跟进次数</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody id="tbody_lingdao_ZhiYeGuWen">
                                                    </tbody>
                                                </table>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="div_XiaoShouCeng" style="display:none;">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(0);">
                                    <div class="card card-block bg-green-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZongHe_BenRi">
                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                            </span>
                                        </div>
                                        <div class="counter counter-lg counter-inverse">
                                            <div class="counter-label text-uppercase">本日</div>
                                            <span class="counter-number"><label id="lbl_BenRiGenJin">0</label></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;" onclick="Bind(1);">
                                    <div class="card card-block bg-orange-600" style="height:120px;padding-left: 0px !important;padding-right: 0px !important;">
                                        <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZongHe_BenZhou" style="display:none;">
                                            <span class="ribbon-inner" style="width:28px; height:28px;">
                                                <i class="icon wb-heart" aria-hidden="true"></i>
                                            </span>
                                        </div>
                                        <div class="counter counter-lg counter-inverse">
                                            <div class="counter-label text-uppercase">近7天</div>
                                            <span class="counter-number"><label id="lbl_BenZhouGenJin">0</label></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4" style="width:33.33%; height:20%;float:left;padding-left: 0px !important;padding-right: 0px !important;" onclick="Bind(2);">
                                    <div class="ribbon ribbon-corner ribbon-primary ribbon-reverse ribbon-bottom" id="CaiDai_ZongHe_BenYue" style="display:none;">
                                        <span class="ribbon-inner" style="width:28px; height:28px;">
                                            <i class="icon wb-heart" aria-hidden="true"></i>
                                        </span>
                                    </div>
                                    <div class="card card-block bg-purple-600" style="height:120px;">
                                        <div class="counter counter-lg counter-inverse">
                                            <div class="counter-label text-uppercase">近30天</div>
                                            <span class="counter-number"><label id="lbl_BenYueGenJin">0</label></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-12">
                                <table class="table table-bordered table-hover dataTable table-striped w-full text-nowrap" id="dataTableRenYuan" data-plugin="dataTable">
                                    <thead>
                                        <tr>
                                            <th style="width:85%;">姓名</th>

                                            <th style="width:15%; text-align:center;">跟进次数</th>
                                        </tr>
                                    </thead>
                                    <tbody id="tbody_PuTong_YeWuYuan">

                                    </tbody>
                                </table>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="margin-bottom: 50px;padding-bottom:1px"></div>
